import java.io.FileNotFoundException;
import java.io.IOException;

import alice.tuprolog.*;

public class Main {

	public static void main(String[] args) throws FileNotFoundException, IOException, InvalidTheoryException, MalformedGoalException, NoSolutionException {
		Prolog engine = new Prolog();
		Theory t = new Theory(new java.io.FileInputStream("dressesDBProlog.pl"));
		engine.setTheory(t);
		engine.solve("assertz(color_list(basic_dark_colors,[black, darkBlue, darkGrey, brown])),"+
		"assertz(color_list(basic_light_colors,[white, cream, camel, lightGray ])),"+
		"assertz(delete_sub_list([H|T],L,Z):- delete(H,L,FL), delete_sub_list(T,FL,Z)),"+
		"assertz(delete_sub_list([],L,L)).");
		
		t =engine.getTheory();
		new java.io.FileWriter("result.pl").write(t.toString());
		
		
		//Term list = answer.getVarValue("L");
		//Struct listStruct = (Struct)list;
		//listStruct.
	}

}
